package com.dt76.smallloanfrontenduser.remote.xiaohao;

import com.dt76.smallloanfrontenduser.hystrix.xiaohao.XBorrowOrderHystrix;
import com.dt76.smallloanfrontenduser.pojo.xiaohao.BorrowOrder;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(name = "smallloan-Frontend-Service", fallback= XBorrowOrderHystrix.class )
public interface XBorrowOrderRemote {

    @RequestMapping("/xiaohao/BorrowOrder/addBorrowOrder")
    int addBorrowOrder(@RequestBody BorrowOrder borrowOrder);

    @RequestMapping("/xiaohao/BorrowOrder/qryAllBorrowOrderByUId")
    List<BorrowOrder> qryAllBorrowOrderByUId(@RequestParam("userId") int userId);

    @RequestMapping("/xiaohao/BorrowOrder/qryBorrowOrderBybOID")
    BorrowOrder qryBorrowOrderBybOID(@RequestParam("boId") int boId);
}
